<template>
  <div class="school-page" style="width: 100%;margin-bottom: 10px;" ref="scroll">
    <div class="page">
      <div class="page-bd">
        <!-- 搜索区域 -->
        <div class="page-block" :style="{'height': searchHeight + 'px'}">
          <!-- tabs -->
          <el-row type="flex">
            <div class="queryParams-row1" style="margin-right: 50px;">
              <el-radio-group v-model="majorType" @change="majorTypeChange()" class="queryParams-row1__group">
                <el-radio label="1">理工</el-radio>
                <el-radio label="2">文史</el-radio>
              </el-radio-group>
            </div>
            <el-tabs class="ui-tabs" style="flex: 1; min-width: 0;" v-model="tabs.active" @tab-click="handleTabsClick">
              <el-tab-pane v-for="item in tabs.list" :key="item.id" :label="item.label" :name="item.value">
              </el-tab-pane>
            </el-tabs>
          </el-row>
          <!-- input搜索区 -->
          <div class="ui-tbHeaderForm-searchCells">
            <div class="ui-tbHeaderForm-searchCell">
              <span class="ui-tbHeaderForm-searchCell__label" style="margin-right: 15px;">院校名称</span>
              <el-autocomplete style="width: 180px;" class="ui-tbHeaderForm-searchCell__value" v-model="school"
                               @blur="schoolBoolen = true" @focus="schoolBoolen = false"
                               :fetch-suggestions="querySchoolSearch"
                               placeholder="请输入内容" :trigger-on-focus="false">
              </el-autocomplete>
            </div>
            <div style="flex-shrink: 0; display: flex;">
              <div class="ui-tbHeaderForm-searchCell">
                <span class="ui-tbHeaderForm-searchCell__label">专业1</span>
                <el-autocomplete class="ui-tbHeaderForm-searchCell__value" v-model="major1"
                                 :fetch-suggestions="queryMajorSearch"
                                 placeholder="请输入专业名称" :trigger-on-focus="false" style="width: 180px;">
                </el-autocomplete>
              </div>
              <div class="ui-tbHeaderForm-searchCell">
                <span class="ui-tbHeaderForm-searchCell__label">专业2</span>
                <el-autocomplete class="ui-tbHeaderForm-searchCell__value" v-model="major2"
                                 :fetch-suggestions="queryMajorSearch"
                                 placeholder="请输入专业名称" :trigger-on-focus="false" style="width: 180px;">
                </el-autocomplete>
              </div>
              <div class="ui-tbHeaderForm-searchCell">
                <span class="ui-tbHeaderForm-searchCell__label">专业3</span>
                <el-autocomplete class="ui-tbHeaderForm-searchCell__value" v-model="major3"
                                 :fetch-suggestions="queryMajorSearch"
                                 placeholder="请输入专业名称" :trigger-on-focus="false" style="width: 180px;">
                </el-autocomplete>
              </div>
              <div class="ui-tbHeaderForm-searchCell">
                <span class="ui-tbHeaderForm-searchCell__label">分数</span>
                <el-input class="ui-tbHeaderForm-searchCell__value" placeholder="请输入分数" style="width: 100px;"
                          v-model="fraction" :disabled="disabledFlag" @input="Ipt(1)"></el-input>
              </div>
              <div class="ui-tbHeaderForm-searchCell">
                <span class="ui-tbHeaderForm-searchCell__label">位次</span>
                <el-input class="ui-tbHeaderForm-searchCell__value" placeholder="请输入位次" style="width: 100px;"
                          v-model="precedence" :disabled="disabledFlag" @input="Ipt(2)"></el-input>
              </div>
            </div>
          </div>
          <section class="collapse">
            <div class="chooseBlock" :class="{ 'chooseBlock-close': collapseOpen === false }">
              <div class="chooseBlock-cell">
                <span class="chooseBlock-cell__label">所在省份</span>
                <el-checkbox-group class="ui-tbHeaderForm-elCheckbox" v-model="checkedCities" ref="checkboxCities">
                  <el-checkbox v-for="item in cities" style="margin-left:0; font-size: 15px; padding: 0;"
                               :label="item.value" :key="item.value" @change="sfclick(item.label, $event)">{{
                      item.label
                    }}
                  </el-checkbox>
                </el-checkbox-group>
              </div>
              <div class="chooseBlock-cell">
                <span class="chooseBlock-cell__label">院校类型</span>
                <el-checkbox-group class="ui-tbHeaderForm-elCheckbox" v-model="checkedSchoolTypes">
                  <el-checkbox v-for="item in SchoolTypes" :label="item.value" :key="item.value"
                               @change="schooltypeclick(item.value, $event)">{{ item.value }}
                  </el-checkbox>
                </el-checkbox-group>
              </div>
              <div class="chooseBlock-cell">
                <span class="chooseBlock-cell__label">博硕资格</span>
                <el-checkbox-group class="ui-tbHeaderForm-elCheckbox" v-model="checkedQualifications">
                  <el-checkbox v-for="item in Qualifications" :label="item.value" :key="item.value"
                               @change="qualificationsclick(item.value, $event)">{{ item.label }}
                  </el-checkbox>
                </el-checkbox-group>
              </div>
              <div class="chooseBlock-cell">
                <span class="chooseBlock-cell__label">院校层级</span>
                <el-checkbox-group class="ui-tbHeaderForm-elCheckbox" v-model="checkedHierarchys">
                  <el-checkbox v-for="item in Hierarchys" :label="item.value" :key="item.value"
                               @change="hierarchysclick(item.value, $event)">{{ item.label }}
                  </el-checkbox>
                </el-checkbox-group>
              </div>
              <el-row type="flex">
                <div class="chooseBlock-cell" style="flex: 1; margin-bottom: 0;">
                  <span class="chooseBlock-cell__label">办学性质</span>
                  <el-checkbox-group class="ui-tbHeaderForm-elCheckbox" v-model="checkedNatures">
                    <el-checkbox v-for="item in Natures" :label="item.value" :key="item.value"
                                 @change="natureclick(item.value, $event)">{{ item.label }}
                    </el-checkbox>
                  </el-checkbox-group>
                </div>
              </el-row>
            </div>
            <div class="collapse-tags" v-show="collapseOpen === false"
                 :style="collapseOpen === false && 'min-height: 40px;'">
              <template
                v-for="(item) in ['checkedCities', 'checkedSchoolTypes', 'checkedQualifications', 'checkedHierarchys', 'checkedNatures']">
                <el-tag v-if="checkboxTagFilter(item)" @close="resetCheckBoxItem(item)" closable>
                  {{ checkboxTagFilter(item) }}
                </el-tag>
              </template>
            </div>
            <el-row class="collapse-ft" type="flex" justify="end">
              <div style="flex-shrink: 0; display: flex; align-items: center; pointer-events: auto;">
                <el-button type="primary" size="medium" @click="getSchoolyz()">查询</el-button>
                <el-button size="medium" @click="Reset()">重置</el-button>
                <span v-if="searchTag || searchResultIdList.length > 0"
                      style="margin-left: 30px;margin-right: 15px;color: var(--primaryColor);">
                  <span style="font-size: 14px; font-weight: 500;">
									检索结果  {{ searchCountFn(currentCode) }} / {{ count }}
								</span>
                  <span style="font-size: 16px; cursor: pointer;">
                    <span @click="toNextResultFn(-1)"><i class="el-icon-arrow-up"></i></span>
                    <span @click="toNextResultFn(1)" style="margin-left: 10px"><i class="el-icon-arrow-down"></i></span>
                  </span>
                </span>
                <span @click="searchToggleFn"
                      style="font-size: 12px; margin-left: 120px; color: var(--primaryColor); cursor: pointer;">
									<img style="width: 15px; height: 15px; vertical-align: text-top;"
                       :style="collapseOpen === false && 'transform: rotateX(180deg);'"
                       src="~@/assets/images/programme-collapse.png" class="icon-home">
									{{ collapseOpen ? '收起' : '展开' }}
								</span>
              </div>
            </el-row>
          </section>
        </div>

        <!-- 表格区域 -->
        <div style="margin: auto;" :style="{'padding-top': searchHeight + 8 + 'px'}">
          <!-- 普通 -->
          <div v-if="normalSchoolShow">
            <div class="el-table ui-table el-table--fit el-table--border el-table--group el-table--enable-row-hover table-spec-th"
              :style="{'top': (searchHeight + ThHeight + 8) + 'px'}">
              <div class="el-table__header-wrapper">
                <table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 1440px;">
                  <colgroup>
                    <col name="el-table_1_column_1" width="85">
                    <col name="el-table_1_column_2" width="175">
                    <col name="el-table_1_column_3_column_4" width="84">
                    <col name="el-table_1_column_3_column_5" width="84">
                    <col name="el-table_1_column_3_column_6" width="84">
                    <col name="el-table_1_column_7_column_8" width="80">
                    <col name="el-table_1_column_7_column_9" width="80">
                    <col name="el-table_1_column_7_column_10" width="80">
                    <col name="el-table_1_column_11_column_12" width="60">
                    <col name="el-table_1_column_11_column_13" width="60">
                    <col name="el-table_1_column_11_column_14" width="60">
                    <col name="el-table_1_column_15" width="65">
                    <col name="el-table_1_column_16" width="65">
                    <col name="el-table_1_column_17" width="75">
                    <col name="el-table_1_column_18" width="75">
                    <col name="el-table_1_column_19" width="82">
                    <col name="el-table_1_column_20" width="80">
                    <col name="el-table_1_column_21" width="65">
                    <col name="el-table_1_column_22" width="1">
                  </colgroup>
                  <thead class="is-group">
                  <tr class="">
                    <th colspan="1" rowspan="2" class="el-table_1_column_1  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">院校代码</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_1_column_2  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">院校名称</div>
                    </th>
                    <th colspan="3" rowspan="1" class="el-table_1_column_3  is-center mergeTh  el-table__cell"
                        style="text-align: center;">
                      <div class="cell">计划数 | 投档数</div>
                    </th>
                    <th colspan="3" rowspan="1" class="el-table_1_column_7  is-center mergeTh  el-table__cell"
                        style="text-align: center;">
                      <div class="cell">投档线</div>
                    </th>
                    <th colspan="3" rowspan="1" class="el-table_1_column_11  is-center mergeTh  el-table__cell"
                        style="text-align: center;">
                      <div class="cell">投档位次</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_1_column_15  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">综合排名</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_1_column_16  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">院校类型</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_1_column_17  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">层级属性</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_1_column_18  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">所在城市</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_1_column_19  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">主管部门</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_1_column_20  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">录取形式</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_1_column_21  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{PlanYear}}计划</div>
                    </th>
                    <th colspan="1" rowspan="2"
                        class="el-table_1_column_22   undefined el-table__expand-column  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell"></div>
                    </th>
                  </tr>
                  <tr class="">
                    <th colspan="1" rowspan="1"
                        class="el-table_1_column_3_column_4  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-2}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_1_column_3_column_5  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-1}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_1_column_3_column_6  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_1_column_7_column_8  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-2}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_1_column_7_column_9  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-1}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_1_column_7_column_10  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_1_column_11_column_12  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-2}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_1_column_11_column_13  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-1}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_1_column_11_column_14  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear}}</div>
                    </th>
                  </tr>
                  </thead>
                </table>
              </div>
            </div>
            <el-table class="ui-table" v-loading="loading" ref="multipleTable" :data="tableData" :cell-style="cellStyle"
                      :row-class-name="schoolClassName" :header-cell-style="{'text-align':'center'}"
                      :show-header="false" :style="{'top': TableTop + 'px'}">
              <el-table-column prop="code" label="院校代码" width="85" align="center">
                <template slot-scope="props">
								<span @click="clickTable(props.row, props.$index)" style="cursor: pointer;">
									<span :class="schoolCodeClasses(props.row.code)">{{ props.row.code }}</span>
									<i v-show="props.isExpanded" style="color: #ccc;" class="el-icon-caret-bottom"></i>
									<i v-show="!props.isExpanded" style="color: #ccc;" class="el-icon-caret-right"></i>
								</span>
                </template>
              </el-table-column>
              <el-table-column prop="schoolName" label="院校名称" min-width="150" align="center">
                <template slot-scope="scope">
                  <div style="display: flex;flex-wrap: nowrap;align-items: center;justify-content: space-between">
                  <span @click="details(scope.row)" style="cursor: pointer;font-size: 14px;text-align: left"
                        v-html="showDate(scope.row.schoolName, '普通')"></span>
                    <div style="cursor: pointer;margin-right: 0.5em;">
                      <i v-if="scope.row.schoolDesc" class="el-icon-warning-outline"
                         style="font-size: 18px;color: #f96630;" @click="introduce(scope.row.schoolDesc)"></i>
                    </div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column prop="toudang2015" label="计划数 | 投档数" min-width="240" align="center" class-name="mergeTh">
                <el-table-column align="center" class-name="mergeTh-child" prop="toudang2019" :label="nowYear - 2 + ''"
                                 width="84px"></el-table-column>
                <el-table-column align="center" class-name="mergeTh-child" prop="toudang2020" :label="nowYear - 1 + ''"
                                 width="84px"></el-table-column>
                <el-table-column align="center" class-name="mergeTh-child" prop="toudang2021" :label="nowYear + ''"
                                 width="84px">
                  <template slot-scope="scope">
                    <span class="font-strong">{{ scope.row.toudang2021 }}</span>
                  </template>
                </el-table-column>
              </el-table-column>

              <el-table-column prop="shift_line2019" label="投档线" min-width="240" align="center" class-name="mergeTh">
                <el-table-column align="center" class-name="mergeTh-child" prop="shiftLine2019"
                                 :label="nowYear - 2 + ''"
                                 width="80"></el-table-column>
                <el-table-column align="center" class-name="mergeTh-child" prop="shiftLine2020"
                                 :label="nowYear - 1 + ''"
                                 width="80"></el-table-column>
                <el-table-column align="center" class-name="mergeTh-child" prop="shiftLine2021" :label="nowYear + ''"
                                 width="80">
                  <template slot-scope="scope">
                    <span class="font-strong">{{ scope.row.shiftLine2021 }}</span>
                  </template>
                </el-table-column>
              </el-table-column>
              <el-table-column prop="ranking2019" label="投档位次" min-width="180" align="center" class-name="mergeTh">
                <el-table-column align="center" class-name="mergeTh-child" prop="ranking2019" :label="nowYear - 2 + ''"
                                 width="60px"></el-table-column>
                <el-table-column align="center" class-name="mergeTh-child" prop="ranking2020" :label="nowYear - 1 + ''"
                                 width="60px"></el-table-column>
                <el-table-column align="center" class-name="mergeTh-child" prop="ranking2021" :label="nowYear + ''"
                                 width="60px">
                  <template slot-scope="scope">
                    <span class="font-strong">{{ scope.row.ranking2021 }}</span>
                  </template>
                </el-table-column>
              </el-table-column>
              <el-table-column v-if="tabs.active != 1 && tabs.active != 2 && tabs.active != 3 && tabs.active != 4"
                               align="center" prop="sortNum" label="综合排名" width="65px">
              </el-table-column>
              <el-table-column align="center" prop="schoolType" label="院校类型" width="65px">
              </el-table-column>

              <el-table-column align="center" prop="level" label="层级属性" width="75px">
              </el-table-column>
              <el-table-column align="center" prop="city" label="所在城市" width="75px">
              </el-table-column>
              <el-table-column align="center" prop="manager" label="主管部门" width="82px">
              </el-table-column>
              <el-table-column align="center" prop="majorPlan" label="录取形式" width="80px">
              </el-table-column>
              <el-table-column align="center" prop="plan2022" :label="PlanYear + '计划'" width="65px">
                <template slot-scope="scope">
								<span v-if="scope.row.plan2022 > scope.row.plan2021" class="icon-top">
									{{ scope.row.plan2022 }}<i>↑</i>
								</span>
                  <span v-else-if="scope.row.plan2021 > scope.row.plan2022" class="icon-bottom">
									{{ scope.row.plan2022 }}<i>↓</i>
								</span>
                  <span v-else>{{ scope.row.plan2022 }}</span>
                </template>
              </el-table-column>
              <!-- 普通-展开后的表格 -->
              <el-table-column type="expand" width="1">
                <template slot-scope="props">
                  <el-table class="ui-expandTable" :data="props.row.children" style="width: 100%;font-size: 14px;"
                            :cell-style="cellStyles">
                    <el-table-column align="center" prop="majorCode" label="专业代码" width="95"></el-table-column>
                    <el-table-column align="center" prop="majorName" label="专业|专业等级">
                      <template slot-scope="scope">
                        <el-row type="flex" style="text-align: left;">
                        <span style="font-size: 14px; margin-right: 0.5em; flex: 1;"
                              v-html="showDate(scope.row.majorName, '普通')"></span>
                          <!-- row.color === 'red' -->
                          <i v-if="scope.row.majorDesc" class="el-icon-warning-outline"
                             style="font-size: 18px;color: #f96630;" @click="introduce(scope.row.majorDesc)"></i>
                        </el-row>
                      </template>
                    </el-table-column>
                    <el-table-column prop="msg2015" label="计划数 / 录取数  |  最高分 / 平均分 / 最低分| 最高位次-最低位次"
                                     class-name="mergeTh"
                                     align="center">
                      <el-table-column prop="msg2015" :label="MajorNowYear - 2 + ''" class-name="mergeTh-child"
                                       width="268" align="center"></el-table-column>
                      <el-table-column prop="msg2016" :label="MajorNowYear - 1 + ''" class-name="mergeTh-child"
                                       width="268" align="center"></el-table-column>
                      <el-table-column prop="msg2017" :label="MajorNowYear + ''" class-name="mergeTh-child" width="268"
                                       align="center"></el-table-column>
                    </el-table-column>
                    <el-table-column prop="plan2018" :label="MajorPlanYear + '计划'" min-width="14" align="center">
                      <template slot-scope="scope">
                      <span v-if="scope.row.plan2018 > scope.row.plan2017" class="icon-top">{{
                          scope.row.plan2018
                        }}↑</span>
                        <span v-else-if="scope.row.plan2017 > scope.row.plan2018"
                              class="icon-bottom">{{ scope.row.plan2018 }}↓</span>
                        <span v-else>{{ scope.row.plan2018 }}</span>
                      </template>
                    </el-table-column>
                  </el-table>
                </template>
              </el-table-column>
            </el-table>
          </div>
          <!-- 特殊批次 -->
          <div v-if="specialSchoolShow">
            <div class="el-table ui-table el-table--fit el-table--border el-table--group el-table--enable-row-hover el-table--enable-row-transition table-spec-th"
              :style="{'top': (searchHeight + ThHeight + 8) + 'px'}">
              <div class="hidden-columns">
                <div data-v-075e9dc0=""></div>
                <div data-v-075e9dc0=""></div>
                <div data-v-075e9dc0="">
                  <div data-v-075e9dc0=""></div>
                  <div data-v-075e9dc0=""></div>
                  <div data-v-075e9dc0=""></div>
                </div>
                <div data-v-075e9dc0="">
                  <div data-v-075e9dc0=""></div>
                  <div data-v-075e9dc0=""></div>
                  <div data-v-075e9dc0=""></div>
                </div>
                <div data-v-075e9dc0="">
                  <div data-v-075e9dc0=""></div>
                  <div data-v-075e9dc0=""></div>
                  <div data-v-075e9dc0=""></div>
                </div>
                <div data-v-075e9dc0=""></div>
                <div data-v-075e9dc0=""></div>
                <div data-v-075e9dc0=""></div>
                <div data-v-075e9dc0=""></div>
                <div data-v-075e9dc0=""></div>
                <div data-v-075e9dc0=""></div>
              </div>
              <div class="el-table__header-wrapper">
                <table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 1440px;">
                  <colgroup>
                    <col name="el-table_2_column_23" width="90">
                    <col name="el-table_2_column_24" width="228">
                    <col name="el-table_2_column_25_column_26" width="84">
                    <col name="el-table_2_column_25_column_27" width="84">
                    <col name="el-table_2_column_25_column_28" width="84">
                    <col name="el-table_2_column_29_column_30" width="110">
                    <col name="el-table_2_column_29_column_31" width="110">
                    <col name="el-table_2_column_29_column_32" width="110">
                    <col name="el-table_2_column_33_column_34" width="70">
                    <col name="el-table_2_column_33_column_35" width="70">
                    <col name="el-table_2_column_33_column_36" width="70">
                    <col name="el-table_2_column_37" width="65">
                    <col name="el-table_2_column_38" width="65">
                    <col name="el-table_2_column_39" width="80">
                    <col name="el-table_2_column_40" width="70">
                    <col name="el-table_2_column_41" width="49">
                    <col name="el-table_2_column_42" width="1">
                  </colgroup>
                  <thead class="is-group">
                  <tr class="">
                    <th colspan="1" rowspan="2" class="el-table_2_column_23  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">院校代码</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_24  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">院校名称</div>
                    </th>
                    <th colspan="3" rowspan="1" class="el-table_2_column_25  is-center mergeTh  el-table__cell"
                        style="text-align: center;">
                      <div class="cell">计划数|投档数</div>
                    </th>
                    <th colspan="3" rowspan="1" class="el-table_2_column_29  is-center mergeTh  el-table__cell"
                        style="text-align: center;">
                      <div class="cell">平行最低分/控制线/投档最低分</div>
                    </th>
                    <th colspan="3" rowspan="1" class="el-table_2_column_33  is-center mergeTh  el-table__cell"
                        style="text-align: center;">
                      <div class="cell">参考位次</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_37  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">层级属性</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_38  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">所在城市</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_39  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">主管部门</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_40  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">报考类别</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_41  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{PlanYear}}计划</div>
                    </th>
                    <th colspan="1" rowspan="2"
                        class="el-table_2_column_42   undefined el-table__expand-column  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell"></div>
                    </th>
                  </tr>
                  <tr class="">
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_25_column_26  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-2}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_25_column_27  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-1}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_25_column_28  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_29_column_30  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-2}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_29_column_31  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-1}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_29_column_32  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_33_column_34  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-2}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_33_column_35  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-1}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_33_column_36  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear}}</div>
                    </th>
                  </tr>
                  </thead>
                </table>
              </div>
            </div>
            <el-table class="ui-table" v-loading="loading" ref="multipleTable1" :data="tableData"
                      :cell-style="cellStyle" style="width: 100%;color: black;overflow: auto;"
                      :header-cell-style="{'text-align':'center'}" :row-class-name="schoolClassName"
                      :show-header="false" :style="{'top': TableTop + 'px'}">
              <el-table-column prop="code" label="院校代码" width="90" align="center">
                <template slot-scope="props">
								<span @click="clickTable(props.row, props.$index)" style="cursor: pointer;">
									<span :class="schoolCodeClasses(props.row.code)">{{ props.row.code }}</span>
									<i v-show="props.isExpanded" style="color: #ccc;" class="el-icon-caret-bottom"></i>
									<i v-show="!props.isExpanded" style="color: #ccc;" class="el-icon-caret-right"></i>
								</span>
                </template>
              </el-table-column>
              <el-table-column prop="schoolName" label="院校名称" align="center" min-width="100">
                <template slot-scope="scope">
                  <div style="display: flex;flex-wrap: nowrap;align-items: center;justify-content: space-between">
                    <div @click="details(scope.row)"
                         style="text-align:left;cursor: pointer;font-size: 14px;margin-left: 0.5em;"
                         v-html="showDate(scope.row.schoolName, '特殊')"></div>
                    <div style="cursor: pointer;font-size: 14px;margin-right: 0.5em;">
                      <i v-if="scope.row.schoolDesc" class="el-icon-warning-outline"
                         style="font-size: 18px;color: #f96630;" @click="introduce(scope.row.schoolDesc)"></i>
                    </div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column prop="toudang2015" label="计划数|投档数" class-name="mergeTh" align="center">
                <el-table-column prop="toudang2019" :label="nowYear - 2 + ''" align="center" class-name="mergeTh-child"
                                 width="84"></el-table-column>
                <el-table-column prop="toudang2020" :label="nowYear - 1 + ''" align="center" class-name="mergeTh-child"
                                 width="84"></el-table-column>
                <el-table-column prop="toudang2021" :label="nowYear + ''" align="center" class-name="mergeTh-child"
                                 width="84">
                  <template slot-scope="scope">
                    <span class="font-strong">{{ scope.row.toudang2021 }}</span>
                  </template>
                </el-table-column>
              </el-table-column>

              <el-table-column prop="shift_line2019" label="平行最低分/控制线/投档最低分" class-name="mergeTh" align="center">
                <el-table-column prop="shiftLine2019" :label="nowYear - 2 + ''" align="center"
                                 class-name="mergeTh-child"
                                 width="110"></el-table-column>
                <el-table-column prop="shiftLine2020" :label="nowYear - 1 + ''" align="center"
                                 class-name="mergeTh-child"
                                 width="110"></el-table-column>
                <el-table-column prop="shiftLine2021" :label="nowYear + ''" align="center" class-name="mergeTh-child"
                                 width="110">
                  <template slot-scope="scope">
                    <span class="font-strong">{{ scope.row.shiftLine2021 }}</span>
                  </template>
                </el-table-column>
              </el-table-column>
              <el-table-column prop="ranking2019" label="参考位次" class-name="mergeTh" align="center">
                <el-table-column prop="ranking2019" :label="nowYear - 2 + ''" class-name="mergeTh-child" align="center"
                                 width="70"></el-table-column>
                <el-table-column prop="ranking2020" :label="nowYear - 1 + ''" class-name="mergeTh-child" align="center"
                                 width="70"></el-table-column>
                <el-table-column prop="ranking2021" :label="nowYear + ''" class-name="mergeTh-child" align="center"
                                 width="70">
                  <template slot-scope="scope">
                    <span class="font-strong">{{ scope.row.ranking2021 }}</span>
                  </template>
                </el-table-column>
              </el-table-column>
              <el-table-column prop="level" label="层级属性" align="center" width="65">
              </el-table-column>
              <el-table-column prop="city" label="所在城市" align="center" width="65">
              </el-table-column>
              <el-table-column prop="manager" label="主管部门" align="center" width="80">
              </el-table-column>
              <el-table-column prop="xiancha" label="报考类别" align="center" width="70">
              </el-table-column>
              <el-table-column prop="plan2022" :label="PlanYear + '计划'" align="center" min-width="22px">
                <template slot-scope="scope">
								<span v-if="scope.row.plan2022 > scope.row.plan2021" class="icon-top">
									{{ scope.row.plan2022 }}<i>↑</i>
								</span>
                  <span v-else-if="scope.row.plan2021 > scope.row.plan2022" class="icon-bottom">
									{{ scope.row.plan2022 }}<i>↓</i>
								</span>
                  <span v-else>{{ scope.row.plan2022 }}</span>
                </template>
              </el-table-column>
              <!-- 特殊批次-展开后的表格 -->
              <el-table-column type="expand" width="1">
                <template slot-scope="props">
                  <el-table class="ui-expandTable" :data="props.row.children" style="width: 100%;"
                            :cell-style="cellStyles">
                    <el-table-column prop="majorCode" label="专业代码" width="95" align="center"></el-table-column>
                    <el-table-column prop="majorName" label="专业|专业等级" align="center">
                      <template slot-scope="scope">
                        <el-row type="flex" style="text-align: left;">
                        <span style="font-size: 14px; margin-right: 0.5em; flex: 1;"
                              v-html="showDate(scope.row.majorName, '普通')"></span>
                          <!-- row.color === 'red' -->
                          <i v-if="scope.row.majorDesc" class="el-icon-warning-outline"
                             style="font-size: 18px;color: #f96630;" @click="introduce(scope.row.majorDesc)"></i>
                        </el-row>
                      </template>
                    </el-table-column>
                    <el-table-column prop="msg2015" label="计划数/录取数|最高分/平均分/最低分|最高位次-最低位次" align="center">
                      <el-table-column prop="msg2015" :label="MajorNowYear - 2 + ''" align="center"
                                       width="268"></el-table-column>
                      <el-table-column prop="msg2016" :label="MajorNowYear - 1 + ''" align="center"
                                       width="268"></el-table-column>
                      <el-table-column prop="msg2017" :label="MajorNowYear + ''" align="center"
                                       width="268"></el-table-column>
                    </el-table-column>
                    <el-table-column prop="plan2018" :label="MajorPlanYear + '计划'" min-width="14px" align="center">
                      <template slot-scope="scope">
                      <span v-if="scope.row.plan2018 > scope.row.plan2017" class="icon-top">{{
                          scope.row.plan2018
                        }}↑</span>
                        <span v-else-if="scope.row.plan2017 > scope.row.plan2018"
                              class="icon-bottom">{{ scope.row.plan2018 }}↓</span>
                        <span v-else>{{ scope.row.plan2018 }}</span>
                      </template>
                    </el-table-column>
                  </el-table>
                </template>
              </el-table-column>
            </el-table>
          </div>
          <!-- 提前批次 -->
          <div v-if="aheadSchoolShow">
            <div class="el-table ui-table el-table--fit el-table--border el-table--group el-table--enable-row-hover el-table--enable-row-transition table-spec-th"
                 :style="{'top': (searchHeight + ThHeight + 8) + 'px'}">
              <div class="el-table__header-wrapper">
                <table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 1440px;">
                  <colgroup>
                    <col name="el-table_2_column_23" width="90">
                    <col name="el-table_2_column_24" width="228">
                    <col name="el-table_2_column_25_column_26" width="100">
                    <col name="el-table_2_column_25_column_27" width="100">
                    <col name="el-table_2_column_25_column_28" width="112">
                    <col name="el-table_2_column_29_column_30" width="100">
                    <col name="el-table_2_column_29_column_31" width="100">
                    <col name="el-table_2_column_29_column_32" width="100">
                    <col name="el-table_2_column_33_column_34" width="60">
                    <col name="el-table_2_column_33_column_35" width="60">
                    <col name="el-table_2_column_33_column_36" width="60">
                    <col name="el-table_2_column_37" width="68">
                    <col name="el-table_2_column_38" width="65">
                    <col name="el-table_2_column_39" width="82">
                    <col name="el-table_2_column_40" width="65">
                    <col name="el-table_2_column_41" width="49">
                    <col name="el-table_2_column_42" width="1">
                  </colgroup>
                  <thead class="is-group">
                  <tr class="">
                    <th colspan="1" rowspan="2" class="el-table_2_column_23  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">院校代码</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_24  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">院校名称</div>
                    </th>
                    <th colspan="3" rowspan="1" class="el-table_2_column_25  is-center mergeTh  el-table__cell"
                        style="text-align: center;">
                      <div class="cell">计划数|投档数</div>
                    </th>
                    <th colspan="3" rowspan="1" class="el-table_2_column_29  is-center mergeTh  el-table__cell"
                        style="text-align: center;">
                      <div class="cell">最高分/平均分/最低分</div>
                    </th>
                    <th colspan="3" rowspan="1" class="el-table_2_column_33  is-center mergeTh  el-table__cell"
                        style="text-align: center;">
                      <div class="cell">参考位次</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_37  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">层级属性</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_38  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">所在城市</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_39  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">主管部门</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_40  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">资格线</div>
                    </th>
                    <th colspan="1" rowspan="2" class="el-table_2_column_41  is-center   is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{PlanYear}}计划</div>
                    </th>
                    <th colspan="1" rowspan="2"
                        class="el-table_2_column_42   undefined el-table__expand-column  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell"></div>
                    </th>
                  </tr>
                  <tr class="">
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_25_column_26  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-2}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_25_column_27  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-1}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_25_column_28  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_29_column_30  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-2}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_29_column_31  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-1}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_29_column_32  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_33_column_34  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-2}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_33_column_35  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear-1}}</div>
                    </th>
                    <th colspan="1" rowspan="1"
                        class="el-table_2_column_33_column_36  is-center mergeTh-child  is-leaf el-table__cell"
                        style="text-align: center;">
                      <div class="cell">{{nowYear}}</div>
                    </th>
                  </tr>
                  </thead>
                </table>
              </div>
            </div>
            <el-table class="ui-table" v-loading="loading" ref="multipleTable2" :data="tableData"
                      :cell-style="cellStyle" :header-cell-style="{'text-align':'center'}" :row-class-name="schoolClassName"
                      :show-header="false" :style="{'top': TableTop + 'px'}">
              <el-table-column prop="code" label="院校代码" width="90" align="center">
                <template slot-scope="props">
								<span @click="clickTable(props.row, props.$index)" style="cursor: pointer;">
									<span :class="schoolCodeClasses(props.row.code)">{{ props.row.code }}</span>
									<i v-show="props.isExpanded" style="color: #ccc;" class="el-icon-caret-bottom"></i>
									<i v-show="!props.isExpanded" style="color: #ccc;" class="el-icon-caret-right"></i>
								</span>
                </template>
              </el-table-column>
              <el-table-column prop="schoolName" label="院校名称" align="center" min-width="100">
                <template slot-scope="scope">
                  <div style="display: flex;flex-wrap: nowrap;align-items: center;justify-content: space-between">
                  <span @click="details(scope.row)"
                        style="cursor: pointer;font-size: 14px;margin-left: 0.5em;text-align: left"
                        v-html="showDate(scope.row.schoolName, '提前')"></span>
                    <div style="cursor: pointer;font-size: 14px;margin-right: 0.5em;">
                      <i v-if="scope.row.schoolDesc" class="el-icon-warning-outline"
                         style="font-size: 18px;color: #f96630;" @click="introduce(scope.row.schoolDesc)"></i>
                    </div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column prop="toudang2015" label="计划数|投档数" class-name="mergeTh" align="center">
                <el-table-column prop="toudang2019" :label="nowYear - 2 + ''" class-name="mergeTh-child" align="center"
                                 width="100"></el-table-column>
                <el-table-column prop="toudang2020" :label="nowYear - 1 + ''" class-name="mergeTh-child" align="center"
                                 width="100"></el-table-column>
                <el-table-column prop="toudang2021" :label="nowYear + ''" class-name="mergeTh-child" align="center"
                                 width="112">
                  <template slot-scope="scope">
                    <span class="font-strong">{{ scope.row.toudang2021 }}</span>
                  </template>
                </el-table-column>
              </el-table-column>

              <el-table-column prop="fluctuation2019" label="最高分/平均分/最低分" class-name="mergeTh" align="center">
                <el-table-column prop="shiftLine2019" :label="nowYear - 2 + ''" class-name="mergeTh-child"
                                 align="center"
                                 width="100"></el-table-column>
                <el-table-column prop="shiftLine2020" :label="nowYear - 1 + ''" class-name="mergeTh-child"
                                 align="center"
                                 width="100"></el-table-column>
                <el-table-column prop="shiftLine2021" :label="nowYear + ''" class-name="mergeTh-child" align="center"
                                 width="100">
                  <template slot-scope="scope">
                    <span class="font-strong">{{ scope.row.shiftLine2021 }}</span>
                  </template>
                </el-table-column>
              </el-table-column>
              <el-table-column prop="ranking2019" label="参考位次" class-name="mergeTh" align="center">
                <el-table-column prop="ranking2019" :label="nowYear - 2 + ''" class-name="mergeTh-child" align="center"
                                 width="60"></el-table-column>
                <el-table-column prop="ranking2020" :label="nowYear - 1 + ''" class-name="mergeTh-child" align="center"
                                 width="60"></el-table-column>
                <el-table-column prop="ranking2021" :label="nowYear + ''" class-name="mergeTh-child" align="center"
                                 width="60">
                  <template slot-scope="scope">
                    <span class="font-strong">{{ scope.row.ranking2021 }}</span>
                  </template>
                </el-table-column>
              </el-table-column>
              <el-table-column prop="level" label="层级属性" width="68" align="center">
              </el-table-column>
              <el-table-column prop="city" label="所在城市" width="65" align="center">
              </el-table-column>
              <el-table-column prop="manager" label="主管部门" width="82" align="center">
              </el-table-column>
              <el-table-column prop="majorPlan" label="资格线" width="65" align="center">
              </el-table-column>
              <el-table-column prop="plan2022" :label="PlanYear + '计划'" min-width="22px" align="center">
                <template slot-scope="scope">
								<span v-if="scope.row.plan2022 > scope.row.plan2021" class="icon-top">
									{{ scope.row.plan2022 }}<i>↑</i>
								</span>
                  <span v-else-if="scope.row.plan2021 > scope.row.plan2022" class="icon-bottom">
									{{ scope.row.plan2022 }}<i>↓</i>
								</span>
                  <span v-else>{{ scope.row.plan2022 }}</span>
                </template>
              </el-table-column>
              <!-- 提前批次-展开后的表格 -->
              <el-table-column type="expand" width="1">
                <template slot-scope="props">
                  <el-table class="ui-expandTable" :data="props.row.children" style="width: 100%;"
                            :cell-style="cellStyles">
                    <el-table-column prop="majorCode" label="专业代码" width="95" align="center"></el-table-column>
                    <el-table-column prop="majorName" label="专业|专业等级" align="center">
                      <template slot-scope="scope">
                        <el-row type="flex" style="text-align: left;">
                        <span style="font-size: 14px; margin-right: 0.5em; flex: 1;"
                              v-html="showDate(scope.row.majorName, '普通')"></span>
                          <i v-if="scope.row.majorDesc" class="el-icon-warning-outline"
                             style="font-size: 18px;color: #f96630;" @click="introduce(scope.row.majorDesc)"></i>
                        </el-row>
                      </template>
                    </el-table-column>
                    <el-table-column prop="msg2015" label="计划数 / 录取数 | 最高分 / 平均分 / 最低分 | 最高位次-最低位次" class-name="mergeTh"
                                     align="center">
                      <el-table-column prop="msg2015" :label="MajorNowYear - 2 + ''" class-name="mergeTh-child"
                                       align="center" min-width="35px"></el-table-column>
                      <el-table-column prop="msg2016" :label="MajorNowYear - 1 + ''" class-name="mergeTh-child"
                                       align="center" min-width="35px"></el-table-column>
                      <el-table-column prop="msg2017" :label="MajorNowYear + ''" class-name="mergeTh-child"
                                       align="center"
                                       min-width="35px"></el-table-column>
                    </el-table-column>
                    <el-table-column prop="plan2018" :label="MajorPlanYear + '计划'" width="65" align="center">
                      <template slot-scope="scope">
                      <span v-if="scope.row.plan2018 > scope.row.plan2017" class="icon-top">{{
                          scope.row.plan2018
                        }}↑</span>
                        <span v-else-if="scope.row.plan2017 > scope.row.plan2018"
                              class="icon-bottom">{{ scope.row.plan2018 }}↓</span>
                        <span v-else>{{ scope.row.plan2018 }}</span>
                      </template>
                    </el-table-column>
                  </el-table>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>

      </div>
    </div>

    <el-dialog :visible.sync="dialogVisibles" width="1000px" :close-on-click-modal="false" style="margin-top: 150px;">
      <div style="font-size: 16px;width: 100%;margin: auto;color: #000000;">
        {{ schoolIntroduce }}
      </div>
    </el-dialog>

    <div class="go-top" @click="goTop">
      ↑ 顶部
    </div>

  </div>
</template>

<script>
import {request} from "@/util/request.js"

const natureOptions = [
  {label: '不限', value: '不限'}, {label: '公办', value: '1'}, {label: '民办', value: '2'}, {label: '合办', value: '3'}
]
const HierarchyOptions = [
  {label: '不限', value: '不限'}, {label: '双一流', value: '1'}, {label: '中央直管', value: '2'}, {
    label: '985',
    value: '3'
  }, {label: '211', value: '4'}, {label: '双高计划', value: '5'}, {label: '国家示范(骨干)', value: '6'}
]
const QualificationsOptions = [
  {label: '不限', value: '不限'}, {label: '硕士点', value: '1'}, {label: '博士点', value: '2'}, {
    label: '研究生院',
    value: '3'
  }, {label: '自划线', value: '4'}, {label: '推免资格', value: '5'}
]
const UnfoldHeight = 192 // 收起高度 192
const PackUpHeight = 394 // 展开高度 394
export default {
  data() {
    return {
      ThHeight: 66, // 表头高度
      TableTop: 57, // 表头高度
      // 搜索区域
      collapseOpen: false, // 展开收起标记
      tabs: {
        list: [
          {label: '提前批A段', value: '1'},
          {label: '提前批B段', value: '2'},
          {label: '提前批C段', value: '3'},
          {label: '提前批专科', value: '4'},
          {label: '国家专项', value: '5'},
          {label: '地方专项', value: '6'},
          {label: '本科一批', value: '7'},
          {label: '一批特殊', value: '8'},
          {label: '本科二批', value: '9'},
          {label: '二批特殊', value: '10'},
          {label: '高职专科', value: '11'}
        ],
        active: '7',
        activeLabel: '本科一批',
      },
      batch: '本科一批',
      majorType: '1',
      normalSchoolShow: true, // 普通
      specialSchoolShow: false, // 特殊
      aheadSchoolShow: false, // 提前
      fraction: null, // 分数
      precedence: null, // 位次
      disabledFlag: false, // 分数/位次是否可填写
      cities: this.$constants.provinces, // 省份数据
      checkedCities: ['不限'],
      SchoolTypes: this.$constants.schoolTypes, // 院校类型
      checkedSchoolTypes: ['不限'],
      Qualifications: QualificationsOptions, // 硕博资格
      checkedQualifications: ['不限'],
      Hierarchys: HierarchyOptions, // 院校层级
      checkedHierarchys: ['不限'],
      Natures: natureOptions, // 办学资质
      checkedNatures: ['不限'],
      pageObject: {
        pageNum: 1,
        pageSize: 40,
        total: 0
      },

      nowYear: null,
      PlanYear: null,
      MajorNowYear: null,
      MajorPlanYear: null,
      schoolBoolen: false,
      searchhead: 0,
      schoolIntroduce: null,
      count: null,
      props: {
        multiple: true
      },
      load: false,
      loading: true,
      value: [],
      options: [],
      schoolNames: [],
      tableData: [],
      drawer: false,
      index: 0,
      isLoad: false,
      Submit: 1,
      major1: '',
      major2: '',
      major3: '',
      user: [],
      scheme: [],
      childrenData: [],
      school: '',
      isDisable: true,
      comeTime: 0,
      dialogVisibles: false,
      searchHeight: UnfoldHeight,
      searchResultIdList: [], // 检索出的高亮院校id列表
      currentCode: '', // 院校code，滚动到当前院校
      searchTag: false //是有有搜索条件
    }
  },
  methods: {
    searchToggleFn() {
      this.collapseOpen = !this.collapseOpen
      this.searchHeight = this.collapseOpen ? PackUpHeight : UnfoldHeight
    },
    searchToggleRetract() {
      this.searchHeight = this.collapseOpen ? PackUpHeight : UnfoldHeight
    },
    checkboxTagFilter(value) {
      if (this[value]) {
        return this[value].filter(item => item !== '不限')
          .map(item => {
            if (['checkedNatures', 'checkedHierarchys', 'checkedQualifications'].includes(value)) {
              let arrayKey = value.replace('checked', '')
              let findVal = this[arrayKey].find(i => i.value === item)
              return findVal.label || item
            }
            return item
          })
          .join(',')
      }
      return ''
    },
    // 切换tab
    handleTabsClick(tab, event) {
      this.tabs.active = tab.name
      this.tabs.activeLabel = tab.label
      let label = tab.label
      this.batch = tab.label
      this.load = true
      //年份字典切换
      this.getDict()
      if (label === '提前批A段' || label === '提前批B段' || label === '提前批C段' || label === '提前批专科') {
        this.normalSchoolShow = false
        this.specialSchoolShow = false
        setTimeout(() => {
          this.aheadSchoolShow = true
        }, 500);
        setTimeout(() => {
          this.load = false
        }, 1000);
        this.disabledFlag = true;
      } else if (label === '一批特殊' || label === '二批特殊') {
        this.aheadSchoolShow = false
        this.normalSchoolShow = false
        setTimeout(() => {
          this.specialSchoolShow = true
        }, 500);
        setTimeout(() => {
          this.load = false
        }, 1000);
        this.disabledFlag = true;
      } else {
        this.specialSchoolShow = false
        this.aheadSchoolShow = false
        setTimeout(() => {
          this.normalSchoolShow = true
        }, 100);
        setTimeout(() => {
          this.load = false
        }, 1000);
        this.disabledFlag = false;
      }
      this.Reset()
      this.getSchoolyz()
    },


    Ipt(type) {
      if (type == 1) {
        this.precedence = null
      } else if (type == 2) {
        this.fraction = null
      }

    },
    schoolClassName(row) {
      let batch = "普通";
      if (this.batch === '提前批A段' || this.batch === '提前批B段' || this.batch === '提前批C段' || this.batch === '提前批专科') {
        batch = "提前";
      } else if (this.batch === '一批特殊' || this.batch === '二批特殊') {
        batch = "特殊";
      }
      let name = batch + row.row.code + 'school'
      return name;
    },
    getDict() {
      request({
        method: 'get',
        url: 'sysDict/getDict',
        params: {
          dictType: this.batch
        }
      }).then(res => {
        res.data.forEach(i => {
          if (i.dictName == "now") {
            this.nowYear = i.dictValue
          } else if (i.dictName == "plan") {
            this.PlanYear = i.dictValue
          } else if (i.dictName == "majornow") {
            this.MajorNowYear = i.dictValue
          } else if (i.dictName == "majorplan") {
            this.MajorPlanYear = i.dictValue
          }
        })
      })
    },
    showDate(val, batch) {
      if (this.schoolBoolen == true) {
        val = val + '';
        if (val == this.school && this.school !== '') {
          if (batch == "提前") {
            return val.replace(this.school, '<em class="Tqseat">' + this.school + '</em>')
          } else if (batch == "特殊") {
            return val.replace(this.school, '<em class="Tsseat">' + this.school + '</em>')
          }
          return val.replace(this.school, '<em class="Ptseat">' + this.school + '</em>')
        } else {
          return val
        }
      } else {
        return val
      }

    },
    introduce(row) {
      this.schoolIntroduce = row
      this.dialogVisibles = true
    },
    //执行点击行调用的方法，展开和折叠行
    clickTable(row, index, e) {
      let state = false
      // state = true 收起时清空children数据
      let result = this.tableData.find(item => item.code == row.code)
      if (result && result.children != null) {
        state = true
        result.children = null
      }
      row.isExpanded = state
      if (state == false) {
        this.getSchoolMajor(row, index)
      } else {
        this.$refs.multipleTable && this.$refs.multipleTable.toggleRowExpansion(row, false)
        this.$refs.multipleTable1 && this.$refs.multipleTable1.toggleRowExpansion(row, false)
        this.$refs.multipleTable2 && this.$refs.multipleTable2.toggleRowExpansion(row, false)
      }

    },
    getSchoolMajor(row) {
      this.pageObject.schoolCode = row.code
      // this.pageObject.majorType = this.programmes != null && this.programmes.length > 0 && this.programmes[0].majorType != null ? this.programmes[0].majorType : this.user.major
      this.pageObject.majorType = Number(this.user.major ? this.user.major : this.majorType)
      this.pageObject.major1 = this.major1
      this.pageObject.major2 = this.major2
      this.pageObject.major3 = this.major3;
      if (this.pageObject.majorType == 3) {
        this.pageObject.majorType = 1;
      }
      if (this.pageObject.majorType == 4) {
        this.pageObject.majorType = 2;
      }
      request({
        method: 'post',
        url: 'school/getSchoolMajor',
        data: this.pageObject
      }).then(res => {
        for (let i = 0; i < this.tableData.length; i++) {
          if (this.tableData[i].code == row.code) {
            this.$set(this.tableData[i], "children", res.data)
            this.childrenData.forEach(j => {
              if (this.tableData[i].code == j.schoolCode) {
                if (j.majorList != null && j.majorList != undefined && j.majorList != "") {
                  for (var r = 0; r < j.majorList.length; r++) {
                    res.data.forEach(o => {
                      if (j.majorList[r].majorCode == o.majorCode) {
                        o.sort = j.majorList[r].sort
                      }
                    })
                  }
                }
              }
            })
          }
        }
        this.$forceUpdate()
        this.$refs.multipleTable && this.$refs.multipleTable.toggleRowExpansion(row, true)
        this.$refs.multipleTable1 && this.$refs.multipleTable1.toggleRowExpansion(row, true)
        this.$refs.multipleTable2 && this.$refs.multipleTable2.toggleRowExpansion(row, true)

      })
    },
    ycfrom() {
      this.load = true
      if (this.batch === '提前批A段' || this.batch === '提前批B段' || this.batch === '提前批C段' || this.batch === '提前批专科') {
        this.normalSchoolShow = false
        this.specialSchoolShow = false
        setTimeout(() => {
          this.aheadSchoolShow = true
        }, 500);
        setTimeout(() => {
          this.load = false
        }, 1000);
        this.disabledFlag = true;
      } else if (this.batch === '一批特殊' || this.batch === '二批特殊') {
        this.aheadSchoolShow = false
        this.normalSchoolShow = false
        setTimeout(() => {
          this.specialSchoolShow = true
        }, 500);
        setTimeout(() => {
          this.load = false
        }, 1000);
        this.disabledFlag = true;
      } else {
        this.specialSchoolShow = false
        this.aheadSchoolShow = false
        setTimeout(() => {
          this.normalSchoolShow = true
        }, 100);
        setTimeout(() => {
          this.load = false
        }, 1000);
        this.disabledFlag = false;
      }
    },
    sfclick(e, t) {
      if (e === '不限') {
        this.checkedCities = ['不限']
      } else if (e === '其他') {
        this.checkedCities = ['其他']
      } else {
        this.checkedCities.forEach(i => {
          if (i == '不限' || i == '其他') {
            this.checkedCities.splice(this.checkedCities.indexOf(i), 1)
          }
        })
        if (t == false && this.checkedCities.length < 1) {
          this.checkedCities = ['不限']
        }
      }
    },
    schooltypeclick(e, t) {
      if (e === '不限') {
        this.checkedSchoolTypes = ['不限']
      } else if (e === '其他') {
        this.checkedSchoolTypes = ['其他']
      } else {
        this.checkedSchoolTypes.forEach(i => {
          if (i == '不限' || i == '其他') {
            this.checkedSchoolTypes.splice(this.checkedSchoolTypes.indexOf(i), 1)
          }
        })
        if (t == false && this.checkedSchoolTypes.length < 1) {
          this.checkedSchoolTypes = ['不限']
        }
      }
    },
    natureclick(e, t) {
      if (e === '不限') {
        this.checkedNatures = ['不限']
      } else {
        this.checkedNatures.forEach(i => {
          if (i == '不限') {
            this.checkedNatures.splice(this.checkedNatures.indexOf(i), 1)
          }
        })
        if (t == false && this.checkedNatures.length < 1) {
          this.checkedNatures = ['不限']
        }
      }
    },
    hierarchysclick(e, t) {
      if (e === '不限') {
        this.checkedHierarchys = ['不限']
      } else {
        this.checkedHierarchys.forEach(i => {
          if (i == '不限') {
            this.checkedHierarchys.splice(this.checkedHierarchys.indexOf(i), 1)
          }
        })
        if (t == false && this.checkedHierarchys.length < 1) {
          this.checkedHierarchys = ['不限']
        }
      }
    },
    qualificationsclick(e, t) {
      if (e === '不限') {
        this.checkedQualifications = ['不限']
      } else {
        this.checkedQualifications.forEach(i => {
          if (i == '不限') {
            this.checkedQualifications.splice(this.checkedQualifications.indexOf(i), 1)
          }
        })
        if (t == false && this.checkedQualifications.length < 1) {
          this.checkedQualifications = ['不限']
        }
      }
    },
    queryMajorSearch(queryString, cb) {
      var restaurants = this.options;
      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
      // 调用 callback 返回建议列表的数据
      cb(results);
    },
    createFilter(queryString) {
      return (restaurant) => {
        return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1);
      };
    },
    // 远程搜索院校
    querySchoolSearch(queryString, cb) {
      var restaurants = this.schoolNames;
      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
      // 调用 callback 返回建议列表的数据
      cb(results);
    },
    createFilter1(queryString) {
      return (restaurant) => {
        return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1);
      };
    },
    backHistory() {
      this.$router.go(-1); //返回上一层
    },
    resetCheckBoxItem(dataProp) {
      this[dataProp] = ['不限']
    },
    Reset() {
      this.checkedCities = ['不限']
      this.checkedSchoolTypes = ['不限']
      this.checkedNatures = ['不限']
      this.checkedHierarchys = ['不限']
      this.checkedQualifications = ['不限']
      this.fraction = null
      this.precedence = null
      this.major1 = null
      this.major2 = null
      this.major3 = null
      this.school = null
      this.getSchools()
      this.clearCodeFn();
      this.searchTag = false;
    },
    condition() {
      this.Reset()
      this.getSchool()
    },
    details(row) {
      const infos = row;
      localStorage.setItem('infos', JSON.stringify(infos))
      const routeData = this.$router.resolve({
        name: 'school',
        params: {
          info: infos
        }
      })
      window.open(routeData.href, '_blank')
    },
    getMajor() {
      request({
        method: 'get',
        url: 'school/getMajorName',
      }).then(res => {
        this.options = res.data
      })
    },
    getSchoolName() {
      request({
        method: 'post',
        url: 'school/getSchoolName',
        params: {
          majorType: this.majorType,
          batch: this.batch
        }
      }).then(res => {
        this.schoolNames = res.data
      })
    },
    // 搜索后高亮显示某行
    cellStyle({row, column, rowIndex, columnIndex}) {
      let styleClass = ''
      // color:1 td checkbox搜索结果匹配时
      // newColor === 2 td分数与位次的激活样式
      if (row.newColor === 2) {
        styleClass += `color: blue;`;
      } else if (row.color === 1) {
        styleClass += `backgroundColor: var(--orange01);`;
      }
      //院校查询样式
      if (this.school != null && this.school != "" && this.school == row.schoolName && column.property == "schoolName") {
        styleClass += `color: red; font-style: italic;`;
      }
      if (column.label == this.nowYear) {
        if (column.property == 'toudang2021' || column.property == 'shiftLine2021')
          styleClass += `borderRight: 1px solid #DDDDDD !important;`;
      }
      return styleClass
    },
    // 搜索后高亮显示某行--用于展开后的表格样式
    cellStyles({row, column, rowIndex, columnIndex}) {
      let styleClass = ''
      if (row.color === 'red') {
        styleClass = `color: var(--primaryColor)`;
      }
      return styleClass
    },
    change() {
      this.isLong = this.value.length > 3;
    },
    majorTypeChange() {
      this.Reset()
      this.getSchoolyz()
    },
    getSchoolyz() {
      // 清空检索结果院校code list
      this.clearCodeFn()
      //重置之前newColor为2的数据
      this.tableData.forEach(i => {
        if (i.newColor == 2) {
          i.newColor = 0;
        }
      });
      // 学校名称不为空
      if (this.school != null && this.school != "") {
        this.checkedCities = ['不限']
        this.checkedSchoolTypes = ['不限']
        this.checkedNatures = ['不限']
        this.checkedHierarchys = ['不限']
        this.checkedQualifications = ['不限']
        this.major1 = null
        this.major2 = null
        this.major3 = null
        this.fraction = null
        this.precedence = null
        this.tableData.forEach(i => i.color = 0);

        let claas = "Ptseat";
        if (this.batch === '提前批A段' || this.batch === '提前批B段' || this.batch === '提前批C段' || this.batch === '提前批专科') {
          claas = "Tqseat";
        } else if (this.batch === '一批特殊' || this.batch === '二批特殊') {
          claas = "Tsseat";
        }
        // this.tableData.forEach(i => {
        //   if (i.schoolName.indexOf(this.school) >= 0) {
        //     i.newColor = 2
        //   }
        // });
        //搜索之后默认搜索栏收起
        this.collapseOpen = false;
        this.searchToggleRetract();

        let num = document.getElementsByClassName(claas).length;
        if (num != 0) {  //如果查询关键词存在，跳到第一个关键词的位置
          this.count = num
          document.getElementsByClassName(claas)[this.searchhead].scrollIntoView({block: "center"}); //scrollIntoView方法只在原生document中可以使用，jquery中没有这个方法，参数默认是true，将这个元素置于页面第一行（如果页面可以滑动函数才生效）
        } else {
          this.$message({
            message: '无匹配结果！',
            type: 'error'
          });
        }
      } else if (this.checkedCities == '不限' && this.checkedNatures == '不限' && this.checkedHierarchys == '不限' && this.checkedSchoolTypes == '不限'
        && this.checkedQualifications == '不限' && (this.major1 == "" || this.major1 == null)
        && (this.major2 == "" || this.major2 == null) && (this.major3 == "" || this.major3 == null)) {
        // 省份不限 & 办学性质不限 & 院校层级不限 & 院校类型不限 & 博硕资格不限
        // 专业一、二、三 无数据
        // 是不是就是默认检索啊 写这么复杂
        this.getSchools()
        this.searchTag = false;
      } else {
        //搜索之后默认搜索栏收起
        this.collapseOpen = false;
        this.searchToggleRetract();
        this.searchTag = true;
        // 常规有条件检索
        this.getSchool()
      }
    },
    dingweiSchool() {
      if (this.fraction != null && this.fraction != "") {
        let batch = '普通';
        if (this.batch === '提前批A段' || this.batch === '提前批B段' || this.batch === '提前批C段' || this.batch === '提前批专科') {
          batch = "提前";
        } else if (this.batch === '一批特殊' || this.batch === '二批特殊') {
          batch = "特殊";
        }
        this.precedence = null;
        let isOne = 0;
        let code = null;
        let fraction = this.fraction;
        while (isOne == 0) {
          this.tableData.forEach(i => {
            if (isOne == 0) {
              if (i.proposedScore == fraction) {
                code = i.code
                i.newColor = 2
                isOne = 1;
              }
            }
          })
          if (fraction > 150) {
            fraction--;
          } else {
            isOne = 1;
          }
        }
        if (code != null) {
          this.dingweiByNode(batch + code + 'school');
        } else {
          this.$message({
            message: '无匹配结果！',
            type: 'error'
          });
        }
        // this.currentCode = code
      } else if (this.precedence != null && this.precedence != "") {
        let batch = '普通';
        if (this.batch === '提前批A段' || this.batch === '提前批B段' || this.batch === '提前批C段' || this.batch === '提前批专科') {
          batch = "提前";
        } else if (this.batch === '一批特殊' || this.batch === '二批特殊') {
          batch = "特殊";
        }
        this.fraction = null;
        let isOne = 0;
        let code = null;
        let precedence = this.precedence
        this.tableData.forEach(i => {
          if (isOne == 0) {
            if (precedence <= i.proposedwc) {
              code = i.code
              i.newColor = 2
              isOne = 1;
            }
          }
        });
        if (code != null) {
          this.dingweiByNode(batch + code + 'school');
        } else {
          this.$message({
            message: '无匹配结果！',
            type: 'error'
          });
        }
        // this.currentCode = code
      } else {
        let batch = '普通';
        if (this.batch === '提前批A段' || this.batch === '提前批B段' || this.batch === '提前批C段' || this.batch === '提前批专科') {
          batch = "提前";
        } else if (this.batch === '一批特殊' || this.batch === '二批特殊') {
          batch = "特殊";
        }
        let code = null;
        try {
          this.tableData.forEach(i => {
            if (i.color == 1) {
              code = i.code;
              throw new Error('LoopInterrupt');
            }
          });
        } catch (e) {
          if (e.message !== "LoopInterrupt") throw e
        }

        if (code != null) {
          this.dingweiByNode(batch + code + 'school');
        }
        this.currentCode = code
      }
    },
    dingweiByNode(className){
      var dingweiNode = document.getElementsByClassName(className)[this.searchhead];
      if(dingweiNode.previousSibling != null && dingweiNode.previousSibling.previousSibling != null){
        dingweiNode.previousSibling.previousSibling.scrollIntoView({block: "center"}); //scrollIntoView方法只在原生document中可以使用，jquery中没有这个方法，参数默认是true，将这个元素置于页面第一行（如果页面可以滑动函数才生效）
      }else{
        dingweiNode.scrollIntoView({block: "center"}); //scrollIntoView方法只在原生document中可以使用，jquery中没有这个方法，参数默认是true，将这个元素置于页面第一行（如果页面可以滑动函数才生效）
      }
    },
    // 查询学校 带条件检索
    getSchool() {
      this.loading = true
      var hierarchys = "";
      if (this.checkedHierarchys.length > 0) {
        for (var i = 0; i < this.checkedHierarchys.length; i++) {
          if (i < this.checkedHierarchys.length - 1) {
            hierarchys += this.checkedHierarchys[i] + "|";
          } else {
            hierarchys += this.checkedHierarchys[i];
          }
        }
      }
      var qualifications = "";
      if (this.checkedQualifications.length > 0) {
        for (var i = 0; i < this.checkedQualifications.length; i++) {
          if (i < this.checkedQualifications.length - 1) {
            qualifications += this.checkedQualifications[i] + "|";
          } else {
            qualifications += this.checkedQualifications[i];
          }
        }
      }
      if (this.checkedCities == '不限') {
        this.pageObject.city = []
      } else {
        this.pageObject.city = this.checkedCities
      }
      if (this.checkedNatures == '不限') {
        this.pageObject.nature = []
      } else {
        this.pageObject.nature = this.checkedNatures
      }
      if (this.checkedHierarchys == '不限') {
        this.pageObject.hierarchys = ''
      } else {
        this.pageObject.hierarchys = hierarchys
      }
      if (this.checkedSchoolTypes == '不限') {
        this.pageObject.type = []
      } else {
        this.pageObject.type = this.checkedSchoolTypes
      }
      if (this.checkedQualifications == '不限') {
        this.pageObject.qualifications = ''
      } else {
        this.pageObject.qualifications = qualifications
      }

      this.pageObject.major1 = this.major1
      this.pageObject.major2 = this.major2
      this.pageObject.major3 = this.major3
      this.pageObject.school = this.school
      this.pageObject.batch = this.batch
      this.pageObject.majorType = this.majorType
      const _this = this
      this.Submit = 1;
      request({
        method: 'post',
        url: 'school/getSchoolInformation',
        data: this.pageObject
      }).then(res => {
        if (res.data) {
          res.data.forEach(i => i.schemeName = "")
          if (this.tableData) {
            for (var i = 0; i < res.data.length; i++) {
              _this.childrenData.forEach(j => {
                if (res.data[i].code == j.schoolCode) {
                  res.data[i].schemeName = j.schemeName
                  if (j.majorList != null && j.majorList != undefined && j.majorList != "") {
                    for (var r = 0; r < j.majorList.length; r++) {
                      res.data[i].children.forEach(o => {
                        if (j.majorList[r].majorCode == o.majorCode) {
                          o.sort = j.majorList[r].sort
                        }
                      })
                    }
                  }
                }
              })
            }
            this.tableData = res.data;
            let colors = 0;
            res.data.forEach(i => {
              if (i.color == 1) {
                colors = colors + 1;
                this.searchResultIdList.push(i.code) // 存储检索结果需跳转转院校code
              }
            })
            this.count = colors
          } else {
            this.tableData = res.data
            let colors = 0;
            res.data.forEach(i => {
              if (i.color == 1) {
                colors = colors + 1;
                this.searchResultIdList.push(i.code) // 存储检索结果需跳转转院校code
              }
            })
            this.count = colors
          }
        } else {
          this.tableData = null
          this.count = 0
        }
        this.loading = false
        this.dingweiSchool();
      })
    },
    // 清除检索出的code
    clearCodeFn() {
      this.searchResultIdList = []
      this.currentCode = ''
    },
    // 检索结果上一个下一个
    toNextResultFn(type) {
      const index = this.searchResultIdList.findIndex(item => item == this.currentCode);
      let toIndex = index + type
      if (index + type < 0) {
        toIndex = this.searchResultIdList.length - 1
      } else if (index + type >= this.searchResultIdList.length) {
        toIndex = 0
      }
      // 小屏收起检索结果
      // if (this.collapseOpen) {
      //   this.searchToggleFn ()
      // }
      let batch = '普通';
      if (this.batch === '提前批A段' || this.batch === '提前批B段' || this.batch === '提前批C段' || this.batch === '提前批专科') {
        batch = "提前";
      } else if (this.batch === '一批特殊' || this.batch === '二批特殊') {
        batch = "特殊";
      }
      this.currentCode = this.searchResultIdList[toIndex]
      if (document.getElementsByClassName(batch + this.currentCode + 'school')[0]) {
        document.getElementsByClassName(batch + this.currentCode + 'school')[0].scrollIntoView({block: "center"}); //scrollIntoView方法只在原生document中可以使用，jquery中没有这个方法，参数默认是true，将这个元素置于页面第一行（如果页面可以滑动函数才生效）
      } else {
        setTimeout(() => {
          const element = document.getElementsByClassName(batch + this.currentCode + 'school');
          console.log(element);
          if (element) {
            element[this.searchhead].scrollIntoView({block: 'center'});
          } else {
            console.error('未找到类名为' + batch + this.currentCode + 'school的元素');
          }
        }, 500)
      }
    },
    // 搜索结果院校code高亮红色
    schoolCodeClasses(code) {
      let classes = ''
      if (this.currentCode === code) {
        classes = 'school-code-red'
      }
      return classes;
    },
    // 检索code变化
    searchCountFn() {
      if (this.count == 0) {
        return 0;
      }
      let index = 0
      if (this.currentCode) {
        index = this.searchResultIdList.findIndex(item => item == this.currentCode);
      }
      return index + 1;
    },
    // 默认检索，获取所有院校
    getSchools() {
      this.loading = true
      this.pageObject.city = []
      this.pageObject.nature = []
      this.pageObject.hierarchys = ''
      this.pageObject.type = []
      this.pageObject.qualifications = ''
      this.pageObject.major1 = null
      this.pageObject.major2 = null
      this.pageObject.major3 = null
      this.pageObject.school = null
      this.pageObject.batch = this.batch
      this.pageObject.majorType = this.majorType
      const _this = this
      request({
        method: 'post',
        url: 'school/getSchoolInformations',
        data: this.pageObject
      }).then(res => {
        res.data.forEach(i => i.schemeName = "")
        if (this.tableData) {
          for (var i = 0; i < res.data.length; i++) {
            _this.childrenData.forEach(j => {
              if (res.data[i].code == j.schoolCode) {
                res.data[i].schemeName = j.schemeName
                if (j.majorList != null && j.majorList != undefined && j.majorList != "") {
                  for (var r = 0; r < j.majorList.length; r++) {
                    res.data[i].children.forEach(o => {
                      if (j.majorList[r].majorCode == o.majorCode) {
                        o.sort = j.majorList[r].sort
                      }
                    })
                  }
                }
              }
            })
          }
          this.tableData = res.data
          this.count = res.data.length
        } else {
          this.tableData = res.data
          this.count = res.data.length
        }
        this.loading = false
        this.dingweiSchool();
      })
    },
    goTop() {
      document.body.scrollTop = document.documentElement.scrollTop = 0;
    }
  },
  mounted() {

  },
  created() {
    const user = sessionStorage.getItem("user");
    this.user = JSON.parse(user)
    // this.getSchools()
    this.getSchoolyz()
    this.getMajor()
    this.getDict()
    this.getSchoolName()

  }
};
</script>

<style>

#t5 .d2 {
  width: 1440px;
  min-width: 1440px;
  margin: 15px auto;
}

#tablefather {
  width: 1440px;
  min-width: 1440px;
  margin: 15px auto;
  position: sticky;
  top: 70px;
  background-color: #fff;
  z-index: 1;
}

#t5 th {
  font-weight: 500;
  height: 50px;
  border: 1px #68696a solid;
}

#t5 select {
  color: black;
  border: 1px black solid;
  width: 9%;
  text-align: center;
  margin-left: 1%;
}

#t5 .d2 ul {
  list-style: none;
  display: inline-block;
  padding: 0;
  margin: 0;
}

#t5 .d2 ul li {
  display: inline-block;
  margin-left: 2px;
  font-size: 15px;
}

#t5 .has-gutter .cell {
  padding: 0;
  color: black;
}

#t5 .el-table__row td div {
  padding: 0;
}

#t5 .el-table__row td {
  padding: 0;
  height: 35px;
}

#t5 .has-gutter th {
  padding: 0;
  height: 28px;
}

#t5 .cell {
  padding: 0;
}

.establishBtn {
  padding: 0;
  text-align: center;
}

.establishBtn span {
  display: inline-block;
  margin-left: 8px;
}

#tab-third {
  font-size: 15px;
}

#t5 .el-tabs__header {
  margin: 0 0 0 0;
}

#t5 .el-table__cell {
  padding: 0rem 0rem 0rem 0rem;
}

.popover-self * {
  padding: 0 0 0 0;
  margin: 0 0 0 0;
}

#t5 .el-dialog__headerbtn .el-dialog__close {
  font-size: 20px;
  color: #000000;
}

#t5 .el-dialog__body {
  padding: 20px 20px;
}

#t5 .el-loading-mask {
  background-color: white;
}

em {
  color: red;
  font-style: italic;
}
</style>

<style lang="stylus">
//.ui-table
//  .b-r-2
//    border-right 2px solid #f00 !important
.school-page
  .el-radio-button__inner
    color: #606266;

  .el-radio-button__orig-radio:checked + .el-radio-button__inner
    color: #fff;
    background-color: #f96630;
    border-color: #f96630;
    box-shadow: -1px 0 0 0 #f96630;

  .ui-tabs
    .el-tabs__item
      font-size 14px

  .el-input__inner
    height: 32px;
    line-height: 32px;

</style>
<style lang="stylus" scoped>
createIconStyle(size, align = text-top) {
  width size
  height size
  vertical-align align
  flex-shrink 0
}

textLabelStyle() {
  font-size: 14px;
  color: #333;
  flex-shrink: 0;
  margin-right: 15px;
  // line-height: 34px;
}

.school-page
  position relative
  font-size: 14px;

.font-strong
  font-weight: bold;

.queryParams-row1
  display flex
  align-items: center;
  textLabelStyle()
  // line-height 1

  &__label
    margin-right 15px
    line-height: 1;

  &__group /deep/
  display flex
    align-items center

    .el-radio__input
      font-size: 14px;

    .el-radio__label
      font-size: 14px;

.el-icon-caret-bottom
  color #ccc
  font-size 10px

.icon-top
  color #39B830

.icon-bottom
  color #f56c6c

.icon-info
  createIconStyle(20px)
  cursor pointer

.el-icon-caret-right
  display none

pageWidth = 1400px
.school-page
  width: pageWidth;
  min-height: BodyMinHeight;
  margin: 0 auto;
  padding-bottom: 30px;

  .el-icon-caret-bottom
    color #ccc
    font-size 10px

  .icon-top
    color #39B830

  .icon-bottom
    color #f96630

  .icon-info
    createIconStyle(20px)
    cursor pointer

  .flex-set
    flex-shrink: 0;
    display: flex;

  .flex-1
    flex: 1;

  .m-r-15
    margin-right: 15px;

  .m-r-25
    margin-right: 25px;

  .p-l-20
    margin-left: 20px;


  .page
    &-bd
      position relative
      width BodyMaxWidth
      margin 0 auto 60px auto
      box-sizing border-box

    &-block
      uiBlock();
      box-sizing border-box
      padding 20px
      margin-bottom 10px
      position fixed
      top 75px
      width 1440px
      z-index 999
      border-top 10px solid #F9F9F9

  .breadcrumb
    font-size: 16px;
    font-weight: 400;
    color: #333333;
    padding 19px 23px 19px 23px

    .icon-home
      width 18px
      height 18px
      vertical-align: top;
      margin-right 5px

.ui-tabs /deep/
margin-right
  40px
  --tabsPadding 10px

.school-code-red
  color #f00

.collapse
  position relative

  &-ft
    position absolute
    bottom 0
    right 0
    width 100%
    pointer-events none

  &-tags
    margin-right 528px

    /deep/ .el-tag
      margin 10px 10px 0 0

  .chooseBlock
    display block
    opacity: 1;
    max-height 500px
    overflow: hidden;
    // transition: all .3s;

    &-close
      max-height 0

    &-cell
      display flex
      position relative
      margin-bottom 10px

      &:last-child
        margin-bottom 0

      &__label
        font-size: 14px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #333;
        flex-shrink 0
        margin-right 15px
        line-height: 34px;


.go-top
  position: fixed;
  right: 20px;
  bottom: 80px;
  height: 50px;
  width: 50px;
  border-radius 50%
  background-color: #f2f5f6;
  box-shadow: 0 0 6px rgba(0, 0, 0, .12);
  text-align: center;
  line-height: 50px;
  color #f96630;
  cursor pointer

.table-spec-th
  position: fixed;
  width: 1440px;
  margin: 0 auto;
  z-index: 999;
</style>
